<template>
  <div>
    <rhls :hotComments="hotComments"></rhls>
    <loadmore v-if="show"></loadmore>
  </div>
</template>

<script>
import rhls from "@/components/Comments/Rhls.vue";
import loadmore from "@/components/LoadMore.vue";
import { getPlaylistsComments } from "@/api/comment";
export default {
  components: { rhls, loadmore },
  data() {
    return {
      show: true,
      playlist: this.$route.query.playlist,
      hotComments: [], //热评
    };
  },
  methods: {
    //获取歌单评论
    async getPlaylistsCommentsFun() {
      await getPlaylistsComments(this.$route.query.playlist.id).then((data) => {
        if (data.code == 200) {
          this.hotComments = data.hotComments;
          this.show = false;
        }
      });
    },
  },
  mounted(){
    
  },
  created() {
    this.getPlaylistsCommentsFun();
  },
};
</script>

<style>
</style>